<?php

/* @var $this \yii\web\View */
/* @var $content string */

use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Breadcrumbs;
AppAsset::register($this);
if(!Yii::$app->controller->module->id == 'app')
{
    \yii\web\YiiAsset::register($this);
}
$this->params['breadcrumbs'] = isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [];
$this->title = \yii\helpers\ArrayHelper::getValue(Yii::$app->params, 'title').$this->title;
$menu = isset(Yii::$app->params['menu']) ? Yii::$app->params['menu'] : [];
$activeMenuId = isset(Yii::$app->params['activeMenuId']) ? Yii::$app->params['activeMenuId'] : [];
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>" class="app">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--[if lt IE 9]>
    <script src="/public/js/ie/html5shiv.js" cache="false"></script>
    <script src="/public/js/ie/respond.min.js" cache="false"></script>
    <script src="/public/js/ie/excanvas.js" cache="false"></script>
    <![endif]-->
    <meta charset="<?= Yii::$app->charset ?>">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div id="wrapper">

    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0;padding-right:15px;">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?=Url::to('index/index')?>">管理后台</a>
        </div>
        <!-- /.navbar-header -->


        <?=$this->render('//layouts/top-nav')?>
        <?=$this->render('//layouts/menu')?>
    </nav>

    <div id="page-wrapper">
        <?php
        echo Breadcrumbs::widget([
            'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
            'class'=>'no-border no-radius b-b b-light pull-in',
        ]);
        ?>
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header"><?=$this->title?></h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <?=$content?>
    </div>
    <!-- /#page-wrapper -->

</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
